home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cbibcode.arc / GETVECT.C < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-05  |  428 b   |  14 lines

  1. /* GETVECT.C --- p. 615 */
  2. #include <stdio.h>
  3. #include <dos.h>
  4. main()
  5. {
  6.     void interrupt(*int_handler)();
  7.     int intno;
  8.     printf("Enter interrupt number in hexadecimal format: ");
  9.     scanf(" %x", &intno);
  10.     int_handler = getvect(intno);
  11.         /* Print out address of the handler using the %p format.
  12.         * Use the F qualifier to get the segment address also. */
  13.     printf("\nThe address of the handler is: %Fp\n", int_handler);
  14. }